1. Field of the Invention
The present invention relates in general to computers, and more particularly to a method, system, and computer program product for grouping and dispatching scans in cache.
2. Description of the Related Art
A storage subsystem may receive Input/Output (I/O) requests directed toward an attached storage system. The attached storage system may comprise an enclosure including numerous interconnected disk drives, such as a Direct Access Storage Device (“DASD”), a Redundant Array of Independent Disks (“RAID” Array), Just A Bunch of Disks (“JBOD”), etc. The storage subsystem may have a cache comprising of one or more gigabytes of volatile storage, e.g., Random Access Memory (RAM), Dynamic Random Access Memory (DRAM), etc. If the storage subsystem receives I/O requests at a rate exceeding the processing capability of the I/O requests at the storage subsystem, the storage subsystem may queue the I/O requests in the cache. A copy of certain modified (write) data may also be placed in the cache. Data may also be automatically prefetched into the cache to quickly satisfy read requests.
The cache may need to be scanned periodically. Scanning a cache may be in response to a host command or may be as a result of automatic error handling behavior activity. During scanning of a cache, the tracks associated with the cache are examined and appropriate actions taken. The appropriate actions may include destage of data from the cache, discarding of data from the cache etc. The appropriate actions may also vary depending on the type of scanning being performed on the cache.
Since the scanning of a cache is a time-consuming operation, particularly when the cache size is large, there is a need in the art for improved techniques for scanning data in cache.